package com.shrct.businessprocess.purchase;

import com.shrct.businessprocess.product.RCProductEntry;
import com.shrct.businessprocess.product.impl.RCProductEntryImpl;
import edu.fudan.mylang.pf.BaseDataType;
import javax.persistence.CascadeType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

public class RCProductAndQuantity extends BaseDataType {
  public RCProductAndQuantity() {
    super();
  }
  
  @JoinColumn(name = "product_id")
  @ManyToOne(targetEntity = RCProductEntryImpl.class, cascade = { CascadeType.MERGE, CascadeType.PERSIST })
  private RCProductEntry product;
  
  public RCProductEntry getProduct() {
    return this.product;
  }
  
  public RCProductAndQuantity setProduct(final RCProductEntry product) {
    this.product = product;
    return this;			
    
  }
  
  private Integer quantity;
  
  public Integer getQuantity() {
    return this.quantity;
  }
  
  public RCProductAndQuantity setQuantity(final Integer quantity) {
    this.quantity = quantity;
    return this;			
    
  }
  
  public static RCProductAndQuantity create() {
    return new RCProductAndQuantity();
    
    
  }
}
